Skip to content

fix: handle SAML/SSO HTML responses in API version fallback#20

Merged
pchuri merged 2 commits intomainfrom
fix/handle-saml-redirect-in-api-fallback
Apr 1, 2026
Merged

fix: handle SAML/SSO HTML responses in API version fallback#20
pchuri merged 2 commits intomainfrom
fix/handle-saml-redirect-in-api-fallback

Conversation

@pchuri
Copy link
Copy Markdown
Owner

@pchuri pchuri commented Apr 1, 2026

Summary

JIRA Data Center with SSO (Okta SAML) returns HTML redirect pages with 200 OK on unsupported API v3 endpoints. This caused displayIssueDetails to crash with Cannot read properties of undefined (reading 'summary').

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Changes Made

  • Detect non-JSON (HTML/string) responses in requestApi and auto-fallback to the other API version
  • Add guard checks in displayIssueDetails and formatIssueAsMarkdown with actionable error messages

Testing

  • All existing tests pass (101/101)
  • Manual testing completed against JIRA Data Center with Okta SSO

Test Results

Test Suites: 7 passed, 7 total
Tests:       101 passed, 101 total

Deployment Notes

  • No special deployment steps required

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

pchuri added 2 commits April 1, 2026 12:33
JIRA Data Center with SSO (e.g. Okta SAML) returns HTML redirect pages
with 200 OK on unsupported API v3 endpoints instead of a proper error.
This caused displayIssueDetails to crash accessing fields on a string.

- Detect non-JSON (HTML/string) responses in requestApi and auto-fallback
- Add guard checks in displayIssueDetails and formatIssueAsMarkdown
@pchuri pchuri merged commit 840b608 into main Apr 1, 2026
5 checks passed
github-actions bot pushed a commit that referenced this pull request Apr 1, 2026
## [2.3.2](v2.3.1...v2.3.2) (2026-04-01)

### Bug Fixes

* handle SAML/SSO HTML responses in API version fallback ([#20](#20)) ([840b608](840b608))
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

🎉 This PR is included in version 2.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant